import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/login'},
    {
      path: '/home',
      component: resolve => require(['src/components/common/Home.vue'], resolve),
      children: [
        {path: '/', component: resolve => require(['src/components/page/homeView.vue'], resolve)},
        {path: '/modifyPassword', component: resolve => require(['src/components/page/user/ModifyPassword.vue'], resolve)},
        {path: '/houseList', component: resolve => require(['src/components/page/house/houseList.vue'], resolve)},
        {path: '/banner/:houseId', component: resolve => require(['src/components/page/house/banner.vue'], resolve)},
        {path: '/test', component: resolve => require(['src/components/page/house/test.vue'], resolve)},
        {path: '/wangEditor', component: resolve => require(['src/components/page/house/wangeditor.vue'], resolve)}
      ]
    },

    {path: '/login', component: resolve => require(['src/components/page/user/Login.vue'], resolve)},
    {path: '/register', component: resolve => require(['src/components/page/user/Register.vue'], resolve)}
  ]
})
